<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html><head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>超市账单管理系统-用户管理</title>
<link type="text/css" rel="stylesheet" href="../css/style.css">
</head>
<body>
	<div class="menu">
		<table>
			<tbody>
				<tr>
					<td>
						<form method="post" action="${pageContext.request.contextPath}/user/search">
							<input name="method" value="query" class="input-text" type="hidden"> 用户名：<input name="username" class="input-text" type="text" value="">&nbsp;&nbsp;&nbsp;&nbsp;
							<input value="查 询" type="submit">
						</form>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="main">

		<div class="optitle clearfix">
			<em><input value="添加用户" class="input-button" onclick="window.location='userAdd.jsp'" type="button">
			</em>
			<div class="title">用户管理&gt;&gt;</div>
		</div>
		<div class="content">
			<table class="list">
				<tbody>
					<tr>
						<td width="70" height="29"><div class="STYLE1" align="center">编号</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">用户名</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">姓名</div>
						</td>
						<td width="150"><div class="STYLE1" align="center">职位</div>
						</td>
					</tr>

					<c:forEach items="${requestScope.users}" var="user">
						<tr>
							<td height="23"><span class="STYLE1">${user.id}</span>
							</td>
							<td><span class="STYLE1">${user.username}</span>
							</td>
							<td><span class="STYLE1"><a href="${pageContext.request.contextPath}/user/show?username=${user.username}">${user.name}</a>
						</span>
							</td>
							<td><span class="STYLE1">
							${user.role}
					     </span>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>

</body></html>